import Vue from 'vue'
const FILTER_FORMATER: any = {
    install (Vue: any) {
        Vue.prototype.FILTER_FORMATER = {
            wordNum: (val: string, num: number) => {
                let str = val || ''
                if (val && num && !isNaN(Number(num)) && val.length > num) {
                    num = Number(num)
                    str = val.substring(0, num) + '...'
                }
                return str
            }
        }
    }
}
Vue.use(FILTER_FORMATER)
